package core;

public class Column {
	private String columnName;
	private	int position;
	private String defaultValue;
	private String dataType;
	private int characterLength;
	private boolean isNull;
	private Table table;
	
	public Column(String columnName, int position, String defaultValue, String dataType, int characterLength, boolean isNull, Table table) {
		this.columnName = columnName;
		this.position = position;
		this.defaultValue = defaultValue;
		this.dataType = dataType;
		this.characterLength = characterLength;
		this.isNull = isNull;
		this.table = table;
	}

	public String getColumnName() {
		return columnName;
	}

	public int getPosition() {
		return position;
	}

	public String getDefaultValue() {
		return defaultValue;
	}

	public String getDataType() {
		return dataType;
	}

	public int getCharacterLength() {
		return characterLength;
	}

	public boolean isNull() {
		return isNull;
	}

	public void setType(String type) {
		dataType = type;
	}
	
	public Table getTable() {
		return table;
	}
	
	@Override
	public String toString() {
		return columnName +":"+ position +":"+ defaultValue +":"+ dataType +":"+ characterLength +":"+ isNull;
	}
}
